Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Giving day] fixed navbar selected item underline bug #868

Merged
merged 2 commits into from
Mar 1, 2025

Conversation

Bookie0
Copy link
Collaborator

@Bookie0 Bookie0 commented Mar 1, 2025

i notice the navbar didn't show an underline under the currently selected page. this is probably a regression from my PR here

  • added underline back when the item is selected (only on links, not on the Apply/Sponsor buttons)
X Before After
Desktop Screenshot 2025-02-28 at 10 01 30 PM Screenshot 2025-02-28 at 10 00 50 PM
Mobile Screenshot 2025-02-28 at 10 02 09 PM Screenshot 2025-02-28 at 10 02 00 PM

@Bookie0 Bookie0 requested a review from a team as a code owner March 1, 2025 03:08
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 10.

@Bookie0 Bookie0 requested review from JasonMun7 and cchrischen March 1, 2025 03:08
@@ -141,7 +138,8 @@ const Navbar: React.FC = () => {
? 'bg-gradient-to-r from-[#F25454] to-[#D63D3D] bg-clip-text text-transparent'
: 'text-white'
}
${item.name === 'Apply' ? '!text-[#000000]' : ''}
${pathname === item.url ? 'underline' : ''}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to add it on the <span> so it applies to the text label instead of on the parent <a>

@@ -141,7 +138,8 @@ const Navbar: React.FC = () => {
? 'bg-gradient-to-r from-[#F25454] to-[#D63D3D] bg-clip-text text-transparent'
: 'text-white'
}
${item.name === 'Apply' ? '!text-[#000000]' : ''}
${pathname === item.url ? 'underline' : ''}
${item.name === 'Apply' ? '!text-[#000000] no-underline' : ''}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override underline on buttons (we shouldn't show an underline)

@Bookie0 Bookie0 merged commit 5c142fa into main Mar 1, 2025
13 checks passed
@Bookie0 Bookie0 deleted the clement-navbar-text-underline-bug branch March 1, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants